#pragma once

#include"Struct.h"

namespace etel{
	class Regex{
		ABSTRACT(Regex)
	protected:
		Regex(RegexType);
	public:
		virtual DUMP(dump)=0;
		virtual EXTRACT(extract)=0;
	private:
		RegexType _regexType;
	};

	class RString:public Regex{
	public:
		virtual ~RString();
		RString(CodeType,bool);
		virtual EXTRACT(extract);
		virtual DUMP(dump);
	private:
		CodeType _string;
		bool _isDyString;
	};

	class RAnyChar:public Regex{
	public:
		virtual ~RAnyChar();
		RAnyChar();
		virtual EXTRACT(extract);
		virtual DUMP(dump);
	};

	class RCharRange:public Regex{
	public:
		virtual ~RCharRange();
		RCharRange(CodeUnitType,CodeUnitType);
		virtual EXTRACT(extract);
		virtual DUMP(dump);
	private:
		CodeUnitType _leftChar,_rightChar;
	};

	class RReference :public Regex{
	public:
		virtual ~RReference();
		RReference(CodeType,bool,BasicSpace*);
		virtual EXTRACT(extract);
		virtual DUMP(dump);
	private:
		CodeType _regexName;
		bool _isDyRegexName;
		BasicSpace* _basicSpace;
	};
}